﻿<UserControl x:Class="WpUserControls.UserControls.PinInputBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="126" d:DesignWidth="376">
    
    <Grid x:Name="LayoutRoot">
        <TextBox Height="0" Name="PinTextBox" Text="" Width="0" VerticalAlignment="Bottom" />
        <StackPanel Name="StackPanel" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Stretch" Orientation="Horizontal">
            <ItemsControl Name="PinChars">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border BorderBrush="Silver" BorderThickness="1" Height="{Binding Size}" Width="{Binding Size}" CornerRadius="{Binding CornerRadius}" Background="{Binding Background}" Margin="{Binding Margin}">
                            <Image Stretch="Fill" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Source="/WpUserControls;component/Images/asterisk.hdpi.png" Visibility="{Binding Visibility}" />
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </StackPanel>
    </Grid>
</UserControl>
